package cn.liontalk.service;

import cn.liontalk.component.ErrorServiceComponent1;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ZhouZhe
 * @version 1.0
 * @description
 * @date 2019-03-31 20:00
 **/
@FeignClient(name = "test-service",fallback = ErrorServiceComponent1.class)
public interface FeignService {


    /**
     * 来自feign测试
     *
     * @param name
     * @return
     */
    @RequestMapping(value = "/test/demo", method = RequestMethod.GET)
    String sayHiFromFeignClient(@RequestParam(value = "name") String name);
}




